package com.elitesland.metadata.repo;

import com.elitesland.metadata.entity.MetaColumnDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <pre>作用说明</pre>
 *
 * @author mir
 * @date 11/21/2020 2:28 AM
 */
@Repository
public interface MetaColumnRepo extends JpaRepository<MetaColumnDO, Long>, QuerydslPredicateExecutor<MetaColumnDO> {

    List<MetaColumnDO> findAllByTableId(Long tableId);

    void deleteAllByTableId(Long tableId);

    void deleteAllByTableIdAndFieldIdIn(Long tableId, List<Long> fieldIds);
}
